<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		
		<div id="div">
			1,2,3,4
		</div>
		<button>yidong</button>
		
		<script type="text/javascript">
			
			var div=document.getElementById("div")
			var button=document.getElementsByTagName("button")[0];
			button.onclick=function(){
				
				var arr=div.innerHTML.split(",");
				arr.push(arr[0]);
				arr.shift();
				div.innerHTML=arr;
			}
			
			
			
		</script>
		
	</body>
</html>
